<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:72:"D:\phpStudy\WWW\mangmeshi/./application/admin\view\user\my_comments.html";i:1521973343;}*/ ?>

<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-content table-responsive" style="padding-top: 15px;">
                <!--信息表 S-->
                <table id="datatable_studentinfo2" data-size="15" style="width: 100%">
                </table>
                <!--信息表 E-->
            </div>
        </div>
        <!--主信息面板 E-->
    </div>
</div>
<input type="hidden" name="uid" id="uid" value="<?php echo $uid; ?>" />
<script>
    /**
     * 查看这条评论有多少人回复
     */
    function comitInfo(c) {
        var cid = c.name;
        //获得修改框内容
        var content = "";
        $.ajax({
            url:"admin/User/twoComments",
            data:'cid=' + cid,
            type:'POST',
            dataType:'HTML',
            success:function(returndata){
                content = returndata;
                $.TeachDialog({
                    modalId: null,
                    animation: null,
//                    largeSize:true,
                    title: "<h2>评论回复</h2>",
                    content: content,
                    showCloseButton: true,
                    showCloseButtonName: '关闭',
                    CloseButtonAddFunc: function () {

                    }
                });
            },
            error:function(){
                alert('数据返回出错，无伤大雅，请继续');
            }
        });
    }
    /**
     *查看评论的内容
     */
    function kancom(c) {
        var cid = c.name;
        $.TeachDialog({
            title: "<h2>评论内容</h2>",
            content: cid,
            showCloseButton: true,
            showCloseButtonName: '关闭',
        });
    }
    /**
     * 删除评论（对应人数和评分）
     * @param c
     */
    function deleteCom(c) {
        var cid = c.name;
        if(confirm('确认删除此评论吗？')){
            $.ajax({
                url: 'admin/User/deleteCom',
                data: 'cid=' + cid,
                type: 'POST',
                dataType: 'JSON',
                success: function (returnData) {
                    if (returnData.status == 0) {
                        layer.msg(returnData.msg,{icon:5,time:1000});
                    } else {
                        $('#datatable_studentinfo2').datagrid('reload');
                        layer.msg(returnData.msg,{icon:6,time:1000});
                    }
                },
                error: function () {
                    $.TeachDialog({
                        content: '系统异常，请联系管理员',
                    });
                }
            });
        }
    }
</script>